package kassiopeia.gui.task

class Plugin implements Comparable {

    static hasMany = [parameters:Parameter]
    static belongsTo = [task:Task]

    static constraints = {
        instanceId (unique:'task')
    }

    static mapping = {
        parameters(lazy:false)
    }

    Date dateCreated

    String instanceId
    String pluginId
    String groupId
    String pluginVersion

    public Plugin() {}

    int compareTo(obj) {
        dateCreated.compareTo(obj.dateCreated)
    }
}
